package net.ys.utils;


import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 * User: NMY
 * Date: 16-9-8
 *
 * @author nmy
 */
public class TimeUtil {

    /**
     * 昨日日期
     *
     * @return
     */
    public static String getYesterday() {
        Calendar c = Calendar.getInstance();
        c.add(Calendar.DAY_OF_MONTH, -1);
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
        String now = format.format(c.getTime());
        return now;
    }
}
